package com.github.gin.springboot.controller;

import com.github.gin.springboot.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by GinPonson on 12/14/2016.
 */
@RestController
public class TestController {

    @Autowired
    HelloService helloService;

    @RequestMapping("/")
    public String index(){
        return "hello world!";
    }

    @RequestMapping("/hello")
    public String hello(){
        return helloService.getMsg();
    }
}
